package com.shop.cereshop.business.dl.logic.controller;

import com.shop.cereshop.business.dl.logic.domain.CereShopDestroyTickets;
import com.shop.cereshop.business.dl.logic.service.CereShopDestroyTicketsService;
import com.shop.cereshop.business.dl.logic.utils.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 况鑫威
 * @Date: 2021/7/27
 * @Time: 16:46
 * @ClassName: CereShopDestroyTicketsController
 * @Description: com.shop.cereshop.business.dl.logic.controller
 */
@RestController
@RequestMapping("/destroyTicket")
public class CereShopDestroyTicketsController {

    @Autowired
    private CereShopDestroyTicketsService cereShopDestroyTicketsService;

    /**
     * 功能描述: 获取核销记录
     * @Param: [cereShopDestroyTickets, page, row]
     * @return: com.shop.cereshop.business.dl.logic.utils.ResultInfo<?>
     * @Author: 况鑫威
     * @Date: 2021/7/27
     * @Time: 16:57
     */
    @PostMapping("/getDestroyTickets")
    public ResultInfo<?> getDestroyTickets(CereShopDestroyTickets cereShopDestroyTickets,
                                           @RequestParam(value = "page", defaultValue = "1") Integer page,
                                           @RequestParam(value = "row", defaultValue = "10") Integer row){
        return new ResultInfo<>(cereShopDestroyTicketsService.selectByPrimarySelective(cereShopDestroyTickets, page, row));
    }
}
